package com.vcc.data.entity;


import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.RelationOneToOne;
import com.mybatisflex.annotation.Table;
import com.vcc.data.base.entity.BaseEntity;
import lombok.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 用户卡
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Table(value = "vcc_user_card")
public class UserCard extends BaseEntity implements Serializable {


    @Column(comment = "卡组ID", value = "card_group_id")
    private Long cardGroupId;

    /**
     * 账号
     */
    @Column(comment = "卡号", value = "card_number")
    private String cardNumber;


    @Column(comment = "卡号后四位", value = "card_number_last_four")
    private String cardNumberLastFour;

    @Column(comment = "vcc", value = "vcc")
    private String vcc;

    @Column(comment = "有效期", value = "expiry")
    private String expiry;

    @Column(comment = "请求时间", value = "request_date")
    private Date requestDate;

    @Column(comment = "订单ID", value = "order_id")
    private String orderId;

    @Column(comment = "卡Id", value = "card_type_id")
    private Long cardTypeId;

    @Column(comment = "用户ID", value = "user_id")
    private Long userId;

    @Column(comment = "渠道卡Id", value = "channel_card_id")
    private String channelCardId;

    @Column(comment = "渠道编码", value = "channel_code")
    private String channelCode;

    @Column(comment = "币种编码", value = "currency_code")
    private String currencyCode;

    @Column(comment = "币种名称", value = "currency_name")
    private String currencyName;


    @Column(comment = "卡类型", value = "card_type")
    private String cardType;

    @Column(comment = "卡组", value = "card_label")
    private String cardLabel;

    @Column(comment = "卡余额", value = "usable_quota")
    private BigDecimal usableQuota;

    @Column(comment = "交易限额 只在共享卡生效", value = "transaction_limit")
    private BigDecimal transactionLimit;


    @Column(comment = "备注", value = "remark")
    private String remark;

    @Column(comment = "状态", value = "card_status")
    private String cardStatus;

    @Column(comment = "总条数", value = "sum_count")
    private Integer sumCount;

    @Column(comment = "成功条数", value = "success_count")
    private Integer successCount;

    @Column(comment = "失败条数", value = "error_count")
    private Integer errorCount;

    @Column(comment = "总金额", value = "sum_amount")
    private BigDecimal sumAmount;

    @Column(comment = "成功金额", value = "success_amount")
    private BigDecimal successAmount;

    @Column(comment = "失败金额", value = "error_amount")
    private BigDecimal errorAmount;

    @Column(comment = "持卡人Id", value = "cardholder_id")
    private Long cardholderId;

    @Column(comment = "共享id", value = "share_account_id")
    private Long shareAccountId;


    @Column(comment = "代理账号", value = "dealer_account", ignore = true)
    private String dealerAccount;

    @Column(comment = "用户账号", value = "account", ignore = true)
    private String account;

    @Column(comment = "持卡人姓", value = "last_name", ignore = true)
    private String lastName;

    @Column(comment = "持卡人名", value = "first_name", ignore = true)
    private String firstName;

    @Column(comment = "卡钱包配置", value = "user_card_wallet", ignore = true)
    private UserCardWallet userCardWallet;


}
